﻿using System.Windows.Data;
using System;
using TED.Model;

namespace TED
{
       public class VideoToVideoTitleConverter : IValueConverter
       {
              #region IValueConverter Members
       
              public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
              {
                     if (value != null)
                     {
                           return (value as TEDVideo).Title;
                     }
                     else
                     {
                           return "Introduction";
                     }
              }
       
              public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
              {
                     throw new NotImplementedException();
              }
       
              #endregion
       }
}
